home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************/
- /* (C) 1993,1994 R. NADE - M. GRANDCHAMP - All Rights Reserved */
- /*****************************************************************************/
- /* This source-code is NOT public domain nor Freeware, this is part of */
- /* 'The C Programming Package' which is Shareware. */
- /* If you use this code, please register and get a free Full-VGA version */
- /*****************************************************************************/
- /*---------------------*
- * CPPLTC1.C *
- * introduction module *
- *---------------------*/
-
- # define DURATION 270
-
- /* Included Files */
- # include <stdio.h>
- # include <io.h>
-
- /* Global Variables */
- extern int x,y,z,i,j,k,l,m,n;
- extern unsigned char c1;
-
-
- /*------------------------*
- * DISPLAY OPENING SCREEN *
- *------------------------*/
- void display_opening_screen()
- {
- /* We erase the screen and put the background colour */
- /* We add the program title */
- /* We draw the borders to get the initial info. */
-
- /* setlinestyle(SOLID_LINE,1,3); rectangle(11,64,213,476);
- rectangle(221,64,423,266); rectangle(431,64,633,266);
- rectangle(221,274,423,476); rectangle(431,274,633,476);
- setlinestyle(SOLID_LINE,1,1); setfillstyle(SOLID_FILL,EGA_LIGHTGRAY);
- bar3d(12,65,212,475,0,0); bar3d(222,65,422,265,0,0);
- bar3d(432,65,632,265,0,0); bar3d(222,275,422,475,0,0);
- bar3d(432,275,632,475,0,0); */
- /* We fill up the rectangles */
- /* Left page */
- /* outtextxy(20,75," PROGRAMME ");
- outtextxy(20,85," ------------ ");
- outtextxy(20,115, ");
- outtextxy(20,135," ");
- outtextxy(20,155," ");
- outtextxy(20,175," ");
- outtextxy(20,195," ");
- outtextxy(20,215," ");
- outtextxy(20,235," ");
- outtextxy(20,255," ");
- outtextxy(20,275," ");
- outtextxy(20,295," ");
- outtextxy(20,315," ");
- outtextxy(20,335," ");
- outtextxy(20,355," ");
- outtextxy(20,375," ");
- outtextxy(20,395," ");
- outtextxy(20,415," ");
- outtextxy(20,435," ");
- outtextxy(20,455," "); */
- /* up Median page */
- /* outtextxy(230,75," APPLICATION N°1 ");
- outtextxy(230,85," --------------- ");
- outtextxy(230,115," ");
- outtextxy(230,135," ");
- outtextxy(230,155," ");
- outtextxy(230,175," ");
- outtextxy(230,195," ");
- outtextxy(230,215," ");
- outtextxy(230,235," "); */
- /* down median Page */
- /* outtextxy(230,285," APPLICATION N°2 ");
- outtextxy(230,295," --------------- ");
- outtextxy(230,325," ");
- outtextxy(230,345," ");
- outtextxy(230,365," ");
- outtextxy(230,385," ");
- outtextxy(230,405," ");
- outtextxy(230,425," ");
- outtextxy(230,445," "); */
- /* up right page */
- /* outtextxy(440,75," APPLICATION N°3 ");
- outtextxy(440,85," --------------- ");
- outtextxy(440,115," ");
- outtextxy(440,135," ");
- outtextxy(440,155," ");
- outtextxy(440,175," ");
- outtextxy(440,195," ");
- outtextxy(440,215," ");
- outtextxy(440,235," "); */
- /* down right page */
- /* outtextxy(440,285," APPLICATION N°4 ");
- outtextxy(440,295," --------------- ");
- outtextxy(440,325," ");
- outtextxy(440,345," ");
- outtextxy(440,365," ");
- outtextxy(440,385," ");
- outtextxy(440,405," ");
- outtextxy(440,425," ");
- outtextxy(440,445," "); */
- }
- /*------------------*
- * VIVALDI'S SPRING *
- *------------------*/
- void vivaldi_s_spring()
- {
- int list1[7]={220,277,277,247,220,330,330};
- int list2[7]={220,277,277,247,220,330,330};
- int list3[9]={330,294,277,294,330,294,277,247,247};
- int list4[7]={220,277,277,247,220,330,330};
- int list5[7]={220,277,277,247,220,330,330};
- int list6[8]={330,294,277,294,330,294,277,247};
- int list7[9]={220,330,294,277,294,330,370,330,330};
- int list8[9]={220,330,294,277,294,330,370,330,330};
- int list9[10]={277,370,294,277,247,220,247,220,220,220};
-
- while(1){
- /* notes list for the introduction music */
- /* n° 1 */
- if(kbhit()!=0){
- c1=getch(); return;
- }
- /* If we pressed a key to stop the introduction */
- /* we return to the main program */
- for(i=0; i<7; i++){
- sound(list1[i]); delay(DURATION);
- }
- nosound();
- /* n° 2 */
- if(kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<7; i++){
- sound(list2[i]); delay(DURATION);
- }
- nosound();
- /* n° 3 */
- if(kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<9; i++){
- sound(list3[i]); delay(DURATION);
- }
- nosound();
- /* n° 4 */
- if(kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<7; i++){
- sound(list4[i]); delay(DURATION);
- }
- nosound();
- /* n° 5 */
- if(kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<7; i++){
- sound(list5[i]); delay(DURATION);
- }
- nosound();
- /* n° 6 */
- if (kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<8; i++){
- sound(list6[i]); delay (DURATION);
- }
- nosound();
- /* n° 7 */
- if(kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<9; i++){
- sound(list7[i]); delay(DURATION);
- }
- nosound();
- /* n° 8 */
- if(kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<9; i++){
- sound(list8[i]); delay(DURATION);
- }
- nosound();
- /* n° 9 */
- if (kbhit()!=0){
- c1=getch(); return;
- }
- for(i=0; i<10; i++){
- sound(list9[i]); delay (DURATION);
- }
- nosound();
- }
- }
- /*----------------*
- * End of program *
- *----------------*/ /*-----------------------*/
-